#include "testlib.h"
#include <iostream>

using namespace std;

int main(int argc, char * argv[]){
    registerValidation(argc, argv);
    int group = atoi(validator.group().c_str());
    if (group == 0) group = 1;
    ensure (group == 1 || group == 2 || group == 3);
    int max_val = 300;
    if (group == 2) max_val = 3000;
    if (group == 3) max_val = 100000;
    int n = inf.readInt(3, max_val, "N");
    inf.readEoln();
    for (int i = 0; i < n; i++) {
      inf.readInt(1, 100000, "a");
      inf.readEoln();      
    }
    inf.readEof();  
}
